home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Demos
/
Bowers Development
/
AppMaker 2.0b5
/
Examples
/
Procedural
/
Gadgets
/
EditM.c
< prev
next >
Wrap
Text File
|
1996-03-19
|
2KB
|
117 lines
/* EditM.c */
/* Created 01/01/95 12:01 PM by AppMaker */
#include <Types.h>
#include <Quickdraw.h>
#include <Controls.h>
#include <Dialogs.h>
#include <Editions.h>
#include <Events.h>
#include <Lists.h>
#include <Menus.h>
#include <TextEdit.h>
#include "ResourceDefs.h"
#include "DoScrap.h"
#include "Globals.h"
#include "EditM.h"
static void DoUndo (void);
static void DoCut (void);
static void DoCopy (void);
static void DoPaste (void);
static void DoClear (void);
static void DoSelectAll (void);
static void DoShowClipboard (void);
/*----------*/
void InitEditM ()
{
} /*InitEditM*/
/*----------*/
static void DoUndo (void)
{
} /*DoUndo*/
/*----------*/
static void DoCut (void)
{
if (cur->text != nil) {
TECut (cur->text);
cur->dirty = true;
scrapDirty = true;
}
} /*DoCut*/
/*----------*/
static void DoCopy (void)
{
if (cur->text != nil) {
TECopy (cur->text);
scrapDirty = true;
}
} /*DoCopy*/
/*----------*/
static void DoPaste (void)
{
if (cur->text != nil) {
TEPaste (cur->text);
cur->dirty = true;
}
} /*DoPaste*/
/*----------*/
static void DoClear (void)
{
if (cur->text != nil) {
TEDelete (cur->text);
cur->dirty = true;
}
} /*DoClear*/
/*----------*/
static void DoSelectAll (void)
{
if (cur->text != nil) {
TESetSelect (0, 32767, cur->text);
}
} /*DoSelectAll*/
/*----------*/
static void DoShowClipboard (void)
{
} /*DoShowClipboard*/
/*----------*/
void DoEdit (short itemNr)
{
switch (itemNr) {
case EditUndo:
DoUndo ();
break;
case EditCut:
DoCut ();
break;
case EditCopy:
DoCopy ();
break;
case EditPaste:
DoPaste ();
break;
case EditClear:
DoClear ();
break;
case EditSelectAll:
DoSelectAll ();
break;
case EditShowClipboard:
DoShowClipboard ();
break;
} /*switch*/
} /*DoEdit*/
/* Edit */